The present invention relates to a method for controlling video rate by feed-forward, estimator-based rate control scheme assisted by scene change detection for MPEG video encoder and an apparatus therefor.
Video rate management has been a challenging technical task in the field of video communication to ensure that the utilization of the transmission media is maximized and that the service delivers the required level of video quality regardless of the input video traffic. The necessity for video rate control arises particularly in the constant bit rate (CBR) applications which transmit a wide range of rapid motion videos via a fixed rate channel. MPEG phase 1 and 2 have been established for the CBR transmission of variety of videos such as movies, sports, as well as for variable bit rate (VBR) communication.
For VBR MPEG transmission, modeling of the compressed video appears as the core task to be tackled since its statistical properties provide a sound base for a strategy to establish an optimum effective bandwidth allocation. Much research work has been performed for establishing a optical model of the compressed video.
For CBR MPEG transmission, bufferingxe2x80x94which stores the compressed video in a first-in-first-out buffer for a specified period of timexe2x80x94is widely used to adapt the variable-bit-rate video to a fixed rate channel. In the buffering, the quantiser is the core function which control the video rate.
Concerning MPEG video rate control, the MPEG standards do not specify the details of the rate control process since they depend entirely on a specific design. MPEG 2 Test Model specifies the detail and is developed as a performance benchmark.
FIG. 1 is a block diagram showing a general video rate controller of the MPEG. In FIG. 1, encoder 2 encodes a quantised video by variable length coding method. Buffer 3 stores the compressed and quantized video signal to smooth bursty compressed video. The occupancy measures the portion of the buffer capacity which is filled by the compressed video data awaiting transmission. The occupancy value(O) is input to a buffer/quantizer regulator 4. The buffer/quantizer regulator 4 determines a quantization step size(Qs) according to the buffer occupancy. The larger value of the buffer occupancy, the larger value of the quantisation step size is determined. The occupancy value of the specific time point informs a quantizer 1 of which step size should be taken for the next encoding operation. The quantizer 1 quantises the DCT video signal according to the quantisation step size(Qs).
In TM5 the rate control algorithm is based on one-step ahead estimation using a picture complexity measure. It consists of three steps: firstly estimating the target number of coded bits and a mean quantization scale for the previous picture; secondly calculating the quantization step size for a whole picture, (base on the current buffer occupancy); and finally, local adaptation of the framewise quantization step size is obtain for a single macro block using a normalized activity in the macro block. In the bit allocation process, bits are allocated to each type of picture (I, P and B picture) in compliance with the approximate ratio of I:P:B=8:3:2, if the input video stationary, i.e. if the scene change features of adjacent pictures are similar. The buffer occupancy is calculated by subtracting the actual number of coded bits from the estimated target bits. Hence, the rate control process of TM5 is considered to directly exploit similarities in the video. However, if the video is not stationary, the number of target bits will differ significantly from the actual coded bits. Likewise, the activity changes in the macroblock often have a large variation if a picture has a large amount of details inside it. This may cause large fluctuations in the occupancy and in the quantization value. Therefore, if there is a rapid scene change in the incoming video, high occupancy or overflow may occur. The case of buffering malfunction is overflow when a dramatic increase in the video rate cannot be accommodated in the finite length buffer.
To solve the above problems, it is an object of the present invention to provide a MPEG video rate control method and apparatus therefor using predicting the future occupancy, i.e. by estimating the video rate for the next picture in order to smooth the video rate without introducing noticeable quality degradation.
To accomplish the above object of the invention, there is provided a method for controlling MPEG video rate, which comprise the steps of:
(a) calculating three values for the scene change features for the input video which are intra-frame variance, inter-frame variance, and picture type value;
(b) estimating a video rate by taking the three values of the scene change feature using a radial basis function(RBF);
(c) estimating a buffer occupancy by the estimated video rate cbfe(k), the current buffer occupancy O(kxe2x88x921,1), and MBF(means bits per frame);
(d) determining a quantization step by a non-linear mapping curve which is determined by the current and the estimated buffer occupancy; and
(e) quantizing the DCT video input using the quantization step size which is determined in the forth step and encoding a quantized video, thereby output a video rate as a result of the compression.
There is a also provided an apparatus for controlling MPEG video rate, which comprises;
scene change calculating means to estimate the intra-frame variance, inter-frame variance, and picture type value of an input video;
video rate estimating means for estimating a video rate of the next frame by taking three scene change features using radial basis function(RBF);
buffer occupancy estimating means for estimating a buffer occupancy of the next frame using the estimated video rate of the said video rate estimating means, the current buffer occupancy, and MBF(means bits per frame); and
quantization step size determining means for determining a quantization step size Qs non-linearly with input of the estimated buffer occupancy of said buffer occupancy estimating means and the current buffer occupancy.